<?php
//graph function
function __createLinePlot($data, $line, $mark=false, $value=false, $legend=false, $csim=false){
	$lineplot=new LinePlot($data);
	$lineplot->SetColor($line['color']);
	$lineplot->SetWeight($line['weight']);
	if ($mark){
		if ($mark['type']) 		$lineplot->mark->SetType($mark['type']);
		if ($mark['fillColor']) $lineplot->mark->SetFillColor($mark['fillColor']);
		if ($mark['width'])		$lineplot->mark->SetWidth($mark['width']);
	}
	if ($value){
		if ($value['color'])	$lineplot->value ->SetColor($value['color']);
		if ($value['font'][0] && $value['font'][1])		$lineplot ->value->SetFont($value['font'][0], $value['font'][1]); 
		if ($value['show']) 	$lineplot ->value->Show();	
	}
	
	if ($legend){
		if ($legend['title'])	$lineplot->SetLegend($legend['title']);
	}
	
	if ($csim) {
		if ($csim['target'] && $csim['alt'])	$lineplot->SetCSIMTargets($csim['target'],$csim['alt']);
	}
	return $lineplot;
}